using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Text;


namespace Mite.Client
{
    public static class DbTypeHelper
    {
        public static string GetTypeMappingsForMsSql()
        {
            var sb = new StringBuilder();
            foreach (var dbtype in Enum.GetNames(typeof(DbType)))
            {
                try
                {
                    SqlParameter param = new SqlParameter();
                    param.DbType = (DbType) Enum.Parse(typeof (DbType), dbtype);
                    sb.AppendFormat("{0} = > {1}\n", dbtype, param.SqlDbType.ToString());    
                }catch
                {
                }
            }
            return sb.ToString();
        }
    }
}